import request from '@/utils/request'

// 创建物料箱信息
export function createMaterialBox(data) {
  return request({
    url: '/hs/material-box/create',
    method: 'post',
    data: data
  })
}

// 更新物料箱信息
export function updateMaterialBox(data) {
  return request({
    url: '/hs/material-box/update',
    method: 'put',
    data: data
  })
}

// 删除物料箱信息
export function deleteMaterialBox(id) {
  return request({
    url: '/hs/material-box/delete?id=' + id,
    method: 'delete'
  })
}

// 获得物料箱信息
export function getMaterialBox(id) {
  return request({
    url: '/hs/material-box/get?id=' + id,
    method: 'get'
  })
}

// 获得物料箱信息
export function getMaterialBoxRespVO(boxCode) {
  return request({
    url: '/hs/material-box/get-box?boxCode=' + boxCode,
    method: 'get'
  })
}

// 获得物料箱信息分页
export function getMaterialBoxPage(params) {
  return request({
    url: '/hs/material-box/page',
    method: 'get',
    params
  })
}
// 导出物料箱信息 Excel
export function exportMaterialBoxExcel(params) {
  return request({
    url: '/hs/material-box/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
